import request from '@/utils/request'

// 查询customsHsGoods列表
export function listGoodsConfig(query) {
  return request({
    url: '/swdecl/customsHsGoods/list',
    method: 'get',
    params: query
  })
}

// 查询customsHsGoods详细
export function getGoodsConfig(id) {
  return request({
    url: '/swdecl/customsHsGoods/getInfo/' + id,
    method: 'get'
  })
}

// 新增customsHsGoods
export function addGoodsConfig(data) {
  return request({
    url: '/swdecl/customsHsGoods/add',
    method: 'post',
    data: data
  })
}

// 修改customsHsGoods
export function updateGoodsConfig(data) {
  return request({
    url: '/swdecl/customsHsGoods/edit',
    method: 'post',
    data: data
  })
}

// 删除customsHsGoods
export function delGoodsConfig(id) {
  return request({
    url: '/swdecl/customsHsGoods/remove/' + id,
    method: 'get'
  })
}

// 同步申报配置项
export function syncGoodsConfig(id) {
  return request({
    url: '/swdecl/customsHsGoods/batchSync/' + id,
    method: 'get'
  })
}

// 同步二级市场
export function syncToAppGoodsConfig(id) {
  return request({
    url: '/swdecl/customsHsGoods/syncToApp/' + id,
    method: 'post'
  })
}

// 导出customsHsGoods
export function exportGoodsConfig(query) {
  return request({
    url: '/swdecl/customsHsGoods/export',
    method: 'get',
    params: query
  })
}


// 获取商品HSCode列表
// 查看回执
export function getGoodsHsCode(params) {
  return request({
    url: '/swdecl/customsHsGoods/findList',
    method: 'get',
    params
  })
}

